/*
 * CBezierCurves.h
 *
 *  Created on: 29.06.2009
 *      Author: cfuerst
 */

bool decas(double a, double b, vector<CPt> bi, double t, CPt &point);

bool deriv_1_2(double a, double b, vector<CPt> bi, double t, CPt &deriv1, CPt &deriv2);

bool deriv_k(double a, double b, vector<CPt> bi, unsigned k, vector<CPt> &derivk);

bool approx_bezier_curve(double a, double b, vector<CPt> bi, unsigned iter_depth, vector<CPt> &polygon);

bool subdivision(double a, double b, vector<CPt> bi, double t,
				 double &a1, double &b1, vector<CPt> &part1,
				 double &a2, double &b2, vector<CPt> &part2);

bool Ck_continuation(vector<CPt> bi, unsigned k, unsigned deg, vector<CPt> &bi_cont);

bool deg_raising(vector<CPt> bi, vector<CPt> &deg_raised);

bool k_deg_raising(vector<CPt> bi, usigned k, vector<CPt> &bi_raised_k);

bool int_change(double a, double b, vector<CPt> bi_ab, double c, double d, vector<CPt> &bi_cd);

bool bezier_2_monom(double a, double b, vector<CPt> bi, vector<CPt> &monom);

bool monom_2_bezier(double a, double b, vector<CPt> ai, vector<CPt> &bi);

bool bezier_2_lagrange(double a, double b, vector<CPt> bi, vector<double> &lagrange_knots, vector<CPt> &lagrange);

bool hermite_2_bezier(double a, double b, vector<CPt> hermite, vector<CPt> &bi);

bool lagrange_2_bezier(double a, double b, vector<CPt> lagrange, vector<double> t_lagrange, vector<CPt> &bi);

bool poly_maple_out(char filename[200], vector<CPt> polygon);

bool curve_maple_out(char filename[200], vector<CPt> bi);

bool bounding_boxes(vector<CPt> bi1, vector<CPt> bi2, bool &empty, CPt &point1, CPt &point2);

bool intersect_bezier(double a1, double b1, vector<CPt> bi1,
					  double a2, double b2, vector<CPt> bi2,
					  unsigned k, double eps, vector<double> &intersect_pts);

